Skip to content

Replace the coof fill-event budget with cascade eligibility semantics#95

Merged
luisleo526 merged 1 commit into
mainfrom
fix/coof-cascade-eligibility
Jul 11, 2026
Merged

Replace the coof fill-event budget with cascade eligibility semantics#95
luisleo526 merged 1 commit into
mainfrom
fix/coof-cascade-eligibility

Conversation

@luisleo526

Copy link
Copy Markdown
Collaborator

What

Under calc_on_order_fills on historical bars the engine enforced a four-fill-event budget per chart bar. TV has no budget — a committed clean-room probe is reproduced 2,325/2,325 trade-for-trade by eligibility semantics: mid-bar-recalc ("cascade") orders fill only at remaining extreme waypoints (gap-fill at the waypoint tick, never intra-segment exact levels, never at C); cascade market orders roll to next-bar open; resting/bar-open-recalc orders keep standard semantics. The budget's two-cycle cap was right by accident, wrong in reach: +302 over-threaded windows (exact-level fills on the final segment) and truncated busy-bar resting fills.

Scoped to the historical 4-tick path (bar-magnifier untouched); new mid-bar provenance flag; non-semantic runaway backstop replaces the constant. Four legacy assertions encoding the budget behavior corrected to the TV pin.

Gates (author + independent fresh-context R7, both green)

  • REDs by stash-cycle: cascade suite 4/30 and corrected legacy assertions 5/259 fail pre-fix → 34/34 + 270/270 post; full ctest 93/93.
  • Coof cohort byte-identical (md5-verified 5,148- and 524-trade exemplars; six coof corpus probes clean); corpus 240/11/1 zero movement.
  • Probe: price exactness 72.6% → 100%, exit/pnl p90 → 0.0; the remaining count residual is a documented cascade exit-limit asymmetry queued for its own probe.
  • Private sweeps: targeted 10/10 and full 412 both 0 up / 0 down (independent whole-board tier diff: zero changes).

🤖 Generated with Claude Code

Under calc_on_order_fills on historical bars, the engine capped each
chart bar at four broker fill events along the 4-tick proximity path.
TV has no such budget: a clean-room probe (committed with its export)
is reproduced trade-for-trade, 2325/2325, by eligibility semantics —
orders placed by a MID-BAR recalc may fill only at the remaining
extreme waypoints (gap-filling at the waypoint price, never at exact
intra-segment levels, never at the close tick), pending cascade market
orders roll to the next bar's open, and orders resting at bar start or
placed at the bar-open recalc keep standard semantics. The budget
produced the right two-cycle cap by accident but the wrong reach: it
exact-level-filled cascade brackets on the final segment (the probe's
+302 over-threaded windows) and truncated busy-bar resting-order fills
TV allows.

Mid-bar provenance is a new pending-order flag set from a scheduler
bar-open marker; the cascade gate is scoped to the historical 4-tick
path (the bar-magnifier path keeps its own semantics); a non-semantic
runaway backstop replaces the budget constant. Four legacy assertions
that encoded the budget behavior are corrected to the TV pin.

Gates: the coof cohort is byte-identical (md5-verified 5148- and
524-trade exemplars; all coof corpus probes clean); probe price
exactness 72.6% -> 100% with exit and pnl p90 collapsing to zero;
corpus 240/11/1 zero movement; full private sweep 0 up / 0 down. A
cascade exit-limit mid-segment asymmetry remains as a documented
residual pending its own discriminating probe.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@luisleo526 luisleo526 merged commit d5fa24c into main Jul 11, 2026
5 checks passed
@luisleo526 luisleo526 deleted the fix/coof-cascade-eligibility branch July 11, 2026 12:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant